"""
MCPy 安装配置文件
"""

from setuptools import setup, find_packages
from pathlib import Path

# 读取README文件
readme_file = Path(__file__).parent / "README.md"
long_description = readme_file.read_text(encoding="utf-8") if readme_file.exists() else ""

# 读取requirements
requirements_file = Path(__file__).parent / "requirements.txt"
requirements = []
if requirements_file.exists():
    requirements = requirements_file.read_text(encoding="utf-8").strip().split('\n')
    requirements = [req.strip() for req in requirements if req.strip() and not req.startswith('#')]

setup(
    name="mcpy",
    version="1.0.0",
    author="MCPy Development Team",
    author_email="mcpy@example.com",
    description="Python到C++代码生成器，专为libmcpp框架设计",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/example/mcpy",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Topic :: Software Development :: Code Generators",
        "Topic :: Software Development :: Compilers",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: C++",
    ],
    python_requires=">=3.8",
    install_requires=requirements,
    include_package_data=True,
    package_data={
        "mcpy": [
            "*.pyi",
        ],
    },
    entry_points={
        "console_scripts": [
            "mcpy=mcpy.cli:main",
        ],
    },
    project_urls={
        "Bug Reports": "https://github.com/example/mcpy/issues",
        "Source": "https://github.com/example/mcpy",
        "Documentation": "https://mcpy.readthedocs.io/",
    },
)